#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "ffmpegutils.h"
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{

    YUVFileSpec yuvFileSpec(0,0,AV_PIX_FMT_NONE,0,"/Users/tgy/Documents/ffmpeg/video/demo02_ffmpeg.h264");

    FFMPEGUtils::h264Decode(yuvFileSpec,"/Users/tgy/Documents/ffmpeg/video/demo02_decode.yuv");

    qDebug() << "width " << yuvFileSpec.getWidth();
    qDebug() << "heigth " << yuvFileSpec.getHeight();
    qDebug() << "fps " << yuvFileSpec.getFps();
    qDebug() << "format " << av_get_pix_fmt_name(yuvFileSpec.getFormat());

}
